#include <vector>
#include <iostream>
#include <algorithm>
#include <numeric>

/**
 * @brief 用accumulate求一个vector<int>中的元素之和
 * 
 * @return int 
 */
int main()
{
    std::vector<int> v1 = {0,1,2,3,4,5,6,7,8,9,10};
    int total = 0;
    total = std::accumulate(v1.cbegin(), v1.cend(), 0);
    std::cout << total << std::endl;
}